Skip to content

Telemetry: Fail initialization if cache file cannot be opened#1287

Open
kkanas wants to merge 2 commits into
devfrom
kkanas/exit-early-when-no-telemetry-events-can-be-streamed
Open

Telemetry: Fail initialization if cache file cannot be opened#1287
kkanas wants to merge 2 commits into
devfrom
kkanas/exit-early-when-no-telemetry-events-can-be-streamed

Conversation

@kkanas

@kkanas kkanas commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

If the cache file cannot be opened, fail initialization early. Otherwise telemetry events are not persisted and never reach the Aria backend.

Description

Describe your changes in as much detail as possible. Provide a link/reference to the issue solved with this request if any.

Checklist

  • I have read the contribution guidelines.
  • I added unit-tests to validate my changes. All unit tests are passing.
  • I have merged the latest dev branch prior to this PR submission.
  • I ran pre-commit on my changes prior to this PR submission.
  • I submitted this PR against the dev branch.

@kkanas kkanas requested review from a team as code owners June 22, 2026 10:27
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Test Results

1 184 tests  ±0   1 184 ✅ ±0   1m 17s ⏱️ ±0s
   66 suites ±0       0 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit eb84257. ± Comparison against base commit 48a7ac9.

♻️ This comment has been updated with latest results.

kkanas added 2 commits June 23, 2026 14:23
If the cache file cannot be opened, fail initialization early.
Otherwise telemetry events are not persisted and never reach the Aria backend.

Signed-off-by: Krzysztof Kanas <kkanas@microsoft.com>
…ruption

ILogManager returned by CreateLogManager is owned and tracked by
LogManagerProvider, not by direct delete.

The previous implementation used std::unique_ptr with the default
deleter for ILogManager. That called delete directly, bypassing
provider-managed teardown and leaving stale provider state for the same
manager name.

On the next test run, creating a manager with the same name could reuse
corrupted internal state, showing a partially destructed object in gdb,
including a null DebugEventDispatcher vptr.

Align destruction with SDK ownership rules.
Call FlushAndTeardown on the manager, then destroy it via LogManagerProvider::DestroyLogManager.
Clear local pointers after teardown.

Signed-off-by: Krzysztof Kanas <kkanas@microsoft.com>
@kkanas kkanas force-pushed the kkanas/exit-early-when-no-telemetry-events-can-be-streamed branch from b9e578b to eb84257 Compare June 23, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant